home *** CD-ROM | disk | FTP | other *** search
/ Crosscountry USA Photo Safari / Crosscountry USA Photo Safari.iso / Data / cc_base / pak00_16bit_f.pk3 / photo_album.gl.p < prev    next >
Text File  |  2003-01-03  |  28KB  |  631 lines

  1. {
  2.  
  3.   Hidden = TRUE;
  4.   
  5.   ChildID = {
  6.     GuiAnimation("background") {
  7.       AnimationID = "image/photo_album.pcx";
  8.       X = 0;
  9.       Y = 0;
  10.       },  
  11.         GuiTextInput("screen_name") {
  12.       X = 30;
  13.       Y = 40;
  14.           Width = 75;
  15.           Height = 20;
  16.           FontID = "font/verdana_9.tf";
  17.       InputDisabled = TRUE;      
  18.           InputText = Mangle(348/*"Photo Album"*/);
  19.         },
  20.         
  21.         GuiLayer("picture"){
  22.       X = 22;
  23.       Y = 63;
  24.       Height = 392;
  25.       Width  = 210;
  26.       ChildID = {
  27.         GuiListbox("list_picture") {
  28.           X = 0;
  29.           Y = 28;
  30.           Height = 367;
  31.           Width  = 208;
  32.           ListHilightedColor = #8EC2E3;
  33.           FontID = "font/verdana_black_14.tf";
  34.           StrListID = "Player1PhotoCity";
  35.     
  36.             ScriptID = script {
  37.             @hide {
  38.               ResPropSetStr(GuiChildByName(SELF,"photo_picture/front_picture"), "last_photo", "");
  39.               AudioStop(CVarGetInt("narration_sound_id"));
  40.             }
  41.             
  42.  
  43.             @play_narration {      
  44.               resid commodity_data_id;
  45.               resid Player;
  46.               int get_row;
  47.               str path;
  48.               str filename;
  49.               str cur_photo;
  50.               
  51.               if ( AudioIsPlaying(CVarGetInt("narration_sound_id")) ) {
  52.                 AudioStop(CVarGetInt("narration_sound_id"));
  53.                 stop;
  54.               }
  55.               
  56.               Player = ResPropGetResID(ResByName("Game"),"game_cur_player");                        
  57.  
  58.               cur_photo = ResPropGetStr(Player, "photo_current");
  59.               if (StrExact(cur_photo,"")) {
  60.                 stop;
  61.               }
  62.  
  63.               commodity_data_id = ResPropGetResID(ResByName("CSVData"), "commodity_id"); 
  64.               path = "csv_data/commodity/";
  65.               get_row = CSVSearch(commodity_data_id, "Name", cur_photo);
  66.               filename  = CSVGetStr(commodity_data_id, "sound", get_row);
  67.                                         
  68.               if (StrExact(filename,"")) {
  69.                 ResPropSetInt(GuiChildByName(SELF,"play_narration"),"Hidden",TRUE);
  70.                 stop;
  71.               }
  72.               
  73.               ResPropSetInt(GuiChildByName(SELF,"play_narration"),"Hidden",FALSE);
  74.               path = StrFormatStr("%s%s",path,filename);
  75.               
  76.               CVarSetInt("narration_sound_id", AudioPlay(ResByName(path)));             
  77.             }
  78.             
  79.             
  80.             @update_picture {      
  81.               resid commodity_data_id;
  82.               resid Player;
  83.               int get_row;
  84.               str path;
  85.               str filename;
  86.               str label;
  87.               str credit;
  88.               str cur_photo;
  89.               str photo_description;
  90.               
  91.               Player = ResPropGetResID(ResByName("Game"),"game_cur_player");                        
  92.  
  93.  
  94.               /* extract commodity data */
  95.               cur_photo = ResPropGetStr(Player, "photo_current");
  96.               if (StrExact(cur_photo,"")) {
  97.                 stop;
  98.               }
  99.               
  100.               commodity_data_id = ResPropGetResID(ResByName("CSVData"), "commodity_id"); 
  101.               path = "csv_data/commodity/";
  102.               get_row = CSVSearch(commodity_data_id, "Name", cur_photo); 
  103.               
  104.               if (CVarGetInt("cur_photo_num") == 1) {
  105.                 filename  = CSVGetStr(commodity_data_id, "front", get_row);
  106.                 label     = CSVGetStr(commodity_data_id, StrFormatStr("front_caption", CVarGetInt("cur_photo_num")), get_row);
  107.                 credit    = CSVGetStr(commodity_data_id, StrFormatStr("front_credit", CVarGetInt("cur_photo_num")), get_row);
  108.               } else {
  109.                 filename  = CSVGetStr(commodity_data_id, StrFormatStr("front%d",CVarGetInt("cur_photo_num")), get_row);
  110.                 label     = CSVGetStr(commodity_data_id, StrFormatStr("front%d_caption",CVarGetInt("cur_photo_num")), get_row);
  111.                 credit    = CSVGetStr(commodity_data_id, StrFormatStr("front%d_credit",CVarGetInt("cur_photo_num")), get_row);
  112.               }
  113.  
  114.               ResPropSetStr(GuiChildByName(SELF,"photo_label"), "InputText", label);
  115.               ResPropSetStr(GuiChildByName(SELF,"photo_credit"),"InputText", credit);
  116.  
  117.               if (StrExact(filename,"")) {
  118.                 stop;
  119.               }
  120.               
  121.               /* check if there is a next picture and if not hide next picture */
  122.               if (StrExact(CSVGetStr(commodity_data_id, StrFormatStr("front%d",CVarGetInt("cur_photo_num")+1), get_row),"")) {
  123.                 ResPropSetInt(GuiChildByName(SELF,"next_picture"),"Hidden",TRUE);
  124.               } else {
  125.                 ResPropSetInt(GuiChildByName(SELF,"next_picture"),"Hidden",FALSE);
  126.               }
  127.  
  128.               /* check if there is a prev picture and if not hide prev picture */
  129.               if (CVarGetInt("cur_photo_num") == 2) {
  130.                 ResPropSetInt(GuiChildByName(SELF,"prev_picture"),"Hidden",FALSE); 
  131.               } else {
  132.                 if (StrExact(CSVGetStr(commodity_data_id, StrFormatStr("front%d",CVarGetInt("cur_photo_num")-1), get_row),"")) {
  133.                   ResPropSetInt(GuiChildByName(SELF,"prev_picture"),"Hidden",TRUE);
  134.                 } else {
  135.                   ResPropSetInt(GuiChildByName(SELF,"prev_picture"),"Hidden",FALSE);
  136.                 }
  137.               }
  138.               
  139.               
  140.                            
  141.               path = StrFormatStr("%s%s",path,filename);
  142.               ResPropSetResID(GuiChildByName(SELF,"photo_picture/front_picture"), "AnimationID", ResByName(path));
  143.               
  144.             }
  145.             
  146.               @show { 
  147.               resid Player;
  148.               resid photo_data_id;    
  149.               resid player_photo;
  150.               resid cur_photo_type;
  151.               resid city_tab_id;
  152.               resid postcard_tab_id;
  153.               resid commodity_tab_id;
  154.               str   cur_photo;
  155.                 str   photo_description;
  156.                 str   photo_picture_front_path;
  157.                 str   photo_picture_back_path;
  158.                 str   photo_picture_front_name;
  159.                 str   photo_picture_back_name;
  160.                 str   last_photo;
  161.                 str   city_caption;
  162.                 int   get_row;      
  163.  
  164.               Player = ResPropGetResID(ResByName("Game"),"game_cur_player");
  165.               
  166.               release("laptop_photo");
  167.               mark("laptop_photo");
  168.               
  169.               cur_photo = ResPropGetStr(Player, "photo_current");
  170.               last_photo = ResPropGetStr(GuiChildByName(SELF,"photo_picture/front_picture"), "last_photo");
  171.               
  172.               cur_photo_type = ResPropGetResID(Player, "photo_current_type");
  173.               ResPropSetResID(SELF,"StrListID",cur_photo_type);
  174.  
  175.               if (cur_photo_type == ResPropGetResID(Player, "photo_commodity")) {
  176.                 /* set the current photo num to 1 */
  177.                 CVarSetInt("cur_photo_num", 1);
  178.           
  179.                 ResParseEvent(SELF,"@update_picture");
  180.               } else {
  181.                 ResPropSetInt(GuiChildByName(SELF,"next_picture"),"Hidden",TRUE);  
  182.                 ResPropSetInt(GuiChildByName(SELF,"prev_picture"),"Hidden",TRUE); 
  183.                 ResPropSetInt(GuiChildByName(SELF,"play_narration"),"Hidden",TRUE);  
  184.               }
  185.  
  186.               
  187.               /* change photo if cur_photo != last photo */
  188.               if (!StrExact(cur_photo,last_photo)) {           
  189.   
  190.                 /* nothing to highlight when there are no photo */
  191.                   if (ResPropGetInt(cur_photo_type, "Count") != 0 ) {
  192.                     GuiListboxSetSelected(SELF, cur_photo);   
  193.                   }
  194.  
  195.                 /* extract photo data from csv*/
  196.                 if (cur_photo_type == ResPropGetResID(Player, "photo_commodity")) {
  197.                 
  198.                   /* extract commodity data */
  199.                   photo_data_id             = ResPropGetResID(ResByName("CSVData"), "commodity_id"); 
  200.                   photo_picture_front_path  = "csv_data/commodity/";                                  
  201.                   get_row                   = CSVSearch(photo_data_id, "Name", cur_photo); 
  202.   
  203.                   if (! StrExact(CSVGetStr(photo_data_id, "sound", get_row),"")) {
  204.                     ResPropSetInt(GuiChildByName(SELF,"play_narration"),"Hidden",FALSE);  
  205.                   }                         
  206.                   
  207.                   /* get commodity photo data from photo_com_data.csv */
  208.                   photo_picture_front_name  = CSVGetStr(photo_data_id, "front", get_row);
  209.                   photo_picture_back_name   = "";
  210.                   photo_description         = CSVGetStr(photo_data_id, "description", get_row);
  211.  
  212.                   /* change to commodity tab */
  213.                   city_tab_id       = ResByName("photo_album.gl/picture/city_tab");
  214.                   postcard_tab_id   = ResByName("photo_album.gl/picture/postcard_tab");
  215.                   commodity_tab_id  = ResByName("photo_album.gl/picture/commodity_tab");
  216.  
  217.                   ResPropSetResID(city_tab_id, "ActiveButtonID", GuiChildByName(city_tab_id,"city_tab_off"));
  218.                   ResPropSetResID(postcard_tab_id, "ActiveButtonID", GuiChildByName(postcard_tab_id,"postcard_tab_off"));
  219.                   ResPropSetResID(commodity_tab_id, "ActiveButtonID", GuiChildByName(commodity_tab_id,"commodity_tab_on"));
  220.  
  221.                   /* set the caption to that of the current photo */
  222.                   ResPropSetStr(GuiChildByName(SELF,"photo_label"), "InputText", CSVGetStr(photo_data_id, "front_caption", get_row));
  223.                   ResPropSetStr(GuiChildByName(SELF,"photo_credit"),"InputText", CSVGetStr(photo_data_id, "front_credit", get_row));
  224.  
  225.  
  226.  
  227.                   /* display photo description */
  228.                   ResPropSetStr(GuiChildByName(SELF,"photo_description"),"InputText", photo_description);                   
  229.  
  230.                 } else if (cur_photo_type == ResPropGetResID(Player, "photo_postcard")) { 
  231.                   
  232.                    ResPropSetStr(GuiChildByName(SELF,"photo_credit"),"InputText", "");
  233.  
  234.                   /* extract postcard data */
  235.                   photo_data_id             = ResPropGetResID(ResByName("CSVData"), "postcard_id"); 
  236.                   photo_picture_front_path  = "csv_data/postcard/";       
  237.                   photo_picture_back_path   = "csv_data/postcard/";                   
  238.                   get_row                   = CSVSearch(photo_data_id, "Name", cur_photo); 
  239.                   
  240.                   /* get postcard photo data from postcard_data.csv */
  241.  
  242.                   photo_picture_front_name  = CSVGetStr(photo_data_id, "front", get_row); 
  243.                   photo_picture_back_name   = CSVGetStr(photo_data_id, "back", get_row); 
  244.                   photo_description         = CSVGetStr(photo_data_id, "description", get_row);    
  245.                   
  246.                   /* change to postcard tab */
  247.                   city_tab_id       = ResByName("photo_album.gl/picture/city_tab");
  248.                   postcard_tab_id   = ResByName("photo_album.gl/picture/postcard_tab");
  249.                   commodity_tab_id  = ResByName("photo_album.gl/picture/commodity_tab");
  250.                   
  251.                   ResPropSetResID(city_tab_id, "ActiveButtonID", GuiChildByName(city_tab_id,"city_tab_off"));
  252.                   ResPropSetResID(postcard_tab_id, "ActiveButtonID", GuiChildByName(postcard_tab_id,"postcard_tab_on"));
  253.                   ResPropSetResID(commodity_tab_id, "ActiveButtonID", GuiChildByName(commodity_tab_id,"commodity_tab_off"));
  254.  
  255.                   /* set the caption to that of the current photo */
  256.                   ResPropSetStr(GuiChildByName(SELF,"photo_label"),"InputText", cur_photo);
  257.                   
  258.                 
  259.                   /* display photo description */
  260.                   ResPropSetStr(GuiChildByName(SELF,"photo_description"),"InputText", photo_description); 
  261.                                                      
  262.                 } else if (cur_photo_type == ResPropGetResID(Player, "photo_city")) { 
  263.                 
  264.                   ResPropSetStr(GuiChildByName(SELF,"photo_credit"),"InputText", "");
  265.                 
  266.                   /* extract city data */                
  267.                   photo_data_id             = ResPropGetResID(ResByName("CSVData"), "city_id"); 
  268.                   photo_picture_front_path  = "csv_data/city/";                  
  269.                   get_row                   = CSVSearch(photo_data_id, "name", cur_photo); 
  270.                   
  271.                   /* get city photo data from photo_city_data.csv */
  272.                   photo_picture_front_name = CSVGetStr(photo_data_id, "city_image", get_row);
  273.                   photo_picture_back_name   = "";
  274.                   city_caption              = CSVGetStr(photo_data_id, "caption", get_row); 
  275.                   photo_description         = CSVGetStr(photo_data_id, "description", get_row); 
  276.                   
  277.                   if (!StrExact("", city_caption)) {
  278.                     photo_description = StrFormatStr("%s\n\n%s",city_caption, photo_description);
  279.                   } 
  280.                   
  281.                   /* set the caption to that of the current photo */
  282.                   ResPropSetStr(GuiChildByName(SELF,"photo_label"),"InputText", cur_photo);
  283.                   
  284.                 
  285.                   /* display photo description */
  286.                   ResPropSetStr(GuiChildByName(SELF,"photo_description"),"InputText", photo_description);                   
  287.  
  288.                   /* change to city tab */
  289.                   city_tab_id       = ResByName("photo_album.gl/picture/city_tab");
  290.                   postcard_tab_id   = ResByName("photo_album.gl/picture/postcard_tab");
  291.                   commodity_tab_id  = ResByName("photo_album.gl/picture/commodity_tab");
  292.                   ResPropSetResID(city_tab_id, "ActiveButtonID", GuiChildByName(city_tab_id,"city_tab_on"));
  293.                   ResPropSetResID(postcard_tab_id, "ActiveButtonID", GuiChildByName(postcard_tab_id,"postcard_tab_off"));
  294.                   ResPropSetResID(commodity_tab_id, "ActiveButtonID", GuiChildByName(commodity_tab_id,"commodity_tab_off"));                               
  295.       
  296.                 }                
  297.                 
  298.                 /* set current photo to last photo */
  299.                 ResPropSetStr  (GuiChildByName(SELF,"photo_picture/front_picture"), "last_photo", cur_photo);
  300.                 ResPropSetResID(GuiChildByName(SELF,"photo_picture/front_picture"), "last_photo_type", cur_photo_type);
  301.                 if (cur_photo_type == ResPropGetResID(Player, "photo_city")) {
  302.                   ResPropSetStr(Player, "photo_last_city", cur_photo);
  303.                 } else if (cur_photo_type == ResPropGetResID(Player, "photo_postcard")) {
  304.                   ResPropSetStr(Player, "photo_last_postcard", cur_photo);
  305.                 } else if (cur_photo_type == ResPropGetResID(Player, "photo_commodity")) {
  306.                   ResPropSetStr(Player, "photo_last_commodity", cur_photo);
  307.                 }
  308.      
  309.                 /* hide flip button when there r no back photo */
  310.                 if (StrExact(photo_picture_back_name, "")) {
  311.                   ResPropSetInt(GuiChildByName(SELF,"flip_photo_button"),"Hidden", TRUE); 
  312.                 } else {
  313.                   ResPropSetInt(GuiChildByName(SELF,"flip_photo_button"),"Hidden", FALSE);          
  314.                 }          
  315.                 
  316.                 /* displays front photo */
  317.                 if (!(StrExact(photo_picture_front_name, ""))) {      /* image size is 270*180 */
  318.                 
  319.                   photo_picture_front_path = StrFormatStr("%s%s", photo_picture_front_path, photo_picture_front_name);
  320.  
  321.                   ResPropSetResID(GuiChildByName(SELF,"photo_picture/front_picture"), "AnimationID", ResByName(photo_picture_front_path));                                                                
  322.                   ResPropSetInt(GuiChildByName(SELF,"photo_picture/front_picture"),"Hidden", FALSE); 
  323.                   ResPropSetInt(GuiChildByName(SELF,"photo_picture/back_picture"),"Hidden", TRUE);         
  324.                   
  325.                   /* displays back photo */
  326.                   if (!(StrExact(photo_picture_back_name, ""))) { 
  327.                     photo_picture_back_path = StrFormatStr("%s%s", photo_picture_back_path, photo_picture_back_name);   
  328.                     ResPropSetResID(GuiChildByName(SELF,"photo_picture/back_picture"), "AnimationID", ResByName(photo_picture_back_path));
  329.                     ResPropSetInt  (GuiChildByName(SELF,"photo_picture/front_picture"),"Hidden", FALSE);
  330.                   }                  
  331.                 } else {
  332.                   /* hide front_picture layer if no photo */
  333.                   ResPropSetInt(GuiChildByName(SELF,"photo_picture/front_picture"),"Hidden", TRUE); 
  334.                 }
  335.                   
  336.  
  337.  
  338.               }   /* END OF IF cur_photo != last_photo */            
  339.             }
  340.               
  341.               @activate{
  342.                 resid Player;
  343.                 str   selected_photo_name;                
  344.  
  345.               Player = ResPropGetResID(ResByName("Game"),"game_cur_player"); 
  346.                 selected_photo_name = GuiListboxGetSelected(SELF);               
  347.               ResPropSetStr(Player, "photo_current", selected_photo_name);
  348.  
  349.               ResPropSetInt(ResByName("photo_album.gl/picture/list_picture"),"Hidden",TRUE);
  350.               ResPropSetInt(ResByName("photo_album.gl/picture/list_picture"),"Hidden",FALSE);
  351.               }
  352.               
  353.           };  /* END OF LIST_PICTURE SCRIPT */
  354.     
  355.           ChildID = {
  356.             GuiScrollBar ("sb") {
  357.               Kind = VERTICAL;
  358.               ChildID = {
  359.                 GuiButton("thumb") {
  360.                   StyleID = "gui/laptop/scrollbar/sb_thumb.gbs";
  361.                 },
  362.                 GuiButton("dec") {
  363.                   StyleID = "gui/laptop/scrollbar/sb_uarrow.gbs";
  364.                 },
  365.                 GuiButton("inc") {
  366.                   StyleID = "gui/laptop/scrollbar/sb_darrow.gbs";
  367.                 }
  368.               };
  369.             },
  370.             GuiLayer("photo_picture") {
  371.               X = 240;
  372.               Y = -20;
  373.               Hidden = FALSE;
  374.               ChildID = {
  375.                     GuiPhotoDisplay("front_picture") {
  376.                       X = 0;
  377.                       Y = 0;
  378.                       },
  379.                       GuiPhotoDisplay("back_picture") {
  380.                       X = 0;
  381.                       Y = 0;
  382.                       }
  383.               };
  384.             },
  385.             
  386.             GuiButton("play_narration") {
  387.                 X = 530;
  388.                 Y = 5;
  389.                 StyleID = "gui/bs/play_sound.gbs";
  390.                 AutoSize = HEIGHT;
  391.                 Hidden = 1;
  392.                 ScriptID = Script {
  393.                   @activate {     
  394.                   ResParseEvent(GuiParent(SELF),"@play_narration");
  395.                 }
  396.                 };
  397.               }, 
  398.               
  399.             GuiButton("next_picture") {
  400.                 X = 515;
  401.                 Y = 95;
  402.                 StyleID = "gui/bs/next_picture.gbs";
  403.                 AutoSize = HEIGHT;
  404.                 ScriptID = Script {
  405.                   @activate {
  406.                     CVarSetInt("cur_photo_num",CVarGetInt("cur_photo_num") + 1);
  407.                   ResParseEvent(GuiParent(SELF),"@update_picture");
  408.                 }
  409.                 };
  410.               }, 
  411.             
  412.             GuiButton("prev_picture") {
  413.                 X = 515;
  414.                 Y = 130;
  415.                 StyleID = "gui/bs/prev_picture.gbs";
  416.                 AutoSize = HEIGHT;
  417.                 ScriptID = Script {
  418.                   @activate {                 
  419.                     CVarSetInt("cur_photo_num",CVarGetInt("cur_photo_num") - 1);
  420.                   ResParseEvent(GuiParent(SELF),"@update_picture");
  421.                   }
  422.                 };
  423.               },             
  424.             
  425.             
  426.             GuiButton("flip_photo_button") {
  427.                 X = 535;
  428.                 Y = 50;
  429.                 StyleID = "gui/bs/flip.gbs";
  430.                 AutoSize = HEIGHT;
  431.                 Hidden = TRUE;
  432.                 ScriptID = Script {
  433.                   @activate {            
  434.                   trace(1);          
  435.                   if (ResPropGetInt(GuiSiblingByName("photo_picture/front_picture"),"Hidden") == 0) {
  436.                     ResPropSetInt(GuiSiblingByName("photo_picture/front_picture"),"Hidden", TRUE);   
  437.                     ResPropSetInt(GuiSiblingByName("photo_picture/back_picture"),"Hidden", FALSE);     
  438.                   } else {
  439.                     ResPropSetInt(GuiSiblingByName("photo_picture/front_picture"),"Hidden", FALSE);   
  440.                     ResPropSetInt(GuiSiblingByName("photo_picture/back_picture"),"Hidden", TRUE);                       
  441.                   }    
  442.                   }
  443.                 };
  444.               },  
  445.  
  446.             GuiTextInput("photo_label") {
  447.               X = 210;
  448.               Y = 166;
  449.               Height = 23;
  450.               Width  = 390;
  451.               FontID = "font/verdana_black_bold_12.tf";
  452.               InputDisabled = TRUE;    
  453.               InputText = "";
  454.             },    
  455.             
  456.             GuiTextInput("photo_credit") {
  457.               X = 255;
  458.               Y = 135;
  459.               Height = 40;
  460.               Width  = 240;
  461.               WordWrap = 1;
  462.               FontID = "font/arial_12.tf";
  463.               InputDisabled = TRUE;
  464.               InputText = "";
  465.             },
  466.             
  467.             GuiTextInput("photo_description") {
  468.                   X = 211;
  469.                   Y = 189;
  470.                   Width = 389;
  471.                   Height = 179; 
  472.                   WordWrap = 1;
  473.               InputDisabled = TRUE;       
  474.                   FontID = "font/arial_black_14.tf";
  475.                   InputText = 4096 : "";
  476.                   ChildID = {
  477.                     GuiScrollBar ("sb") {
  478.                       Kind = VERTICAL;
  479.                       ChildID = {
  480.                         GuiButton("thumb") {
  481.                           StyleID = "gui/laptop/scrollbar/sb_thumb.gbs";
  482.                         },
  483.                         GuiButton("dec") {
  484.                           StyleID = "gui/laptop/scrollbar/sb_uarrow.gbs";
  485.                         },
  486.                         GuiButton("inc") {
  487.                           StyleID = "gui/laptop/scrollbar/sb_darrow.gbs";
  488.                         }
  489.                       };
  490.                     }
  491.                   };    /* END OF POSTCARD_DESCR ChildID */
  492.             }       /* END OF POSTCARD_DESCR */
  493.           };        /* END OF LIST_PICTURE ChildID */
  494.         },
  495.       
  496.       /*==============================*/
  497.       
  498.         GuiButtonGroup("city_tab") {
  499.           X = 0;
  500.           Y = 0;
  501.           Width=100;
  502.           RadioGroupID = 1;
  503.           ScriptID = Script {
  504.             @activate {
  505.               resid Player;
  506.               resid player_photo;
  507.               resid Game;
  508.               resid front_picture_id;
  509.               resid list_picture_id;
  510.               resid photo_city_list_id;
  511.               
  512.               Game          = ResByName("Game");
  513.               Player        = ResPropGetResID(Game,"game_cur_player");  
  514.                             
  515.               front_picture_id    = ResByName("photo_album.gl/picture/list_picture/photo_picture/front_picture");
  516.               photo_city_list_id  = ResPropGetResID(Player, "photo_city");
  517.               ResPropSetStr(Player, "photo_current", ResPropGetStr(Player, "photo_last_city"));
  518.               ResPropSetResID(Player, "photo_current_type", photo_city_list_id);
  519.               
  520.               list_picture_id = ResByName("photo_album.gl/picture/list_picture");
  521.               ResPropSetInt(list_picture_id,"Hidden",TRUE);
  522.               ResPropSetInt(list_picture_id,"Hidden",FALSE);
  523.             }
  524.           };      
  525.           ChildID = {
  526.             GuiButton("city_tab_off") {
  527.               Width = 70;
  528.                 FontID = "font/verdana_9.tf";
  529.                 TextID = Mangle(349/*"City"*/);   
  530.               UpID = "gui/laptop/map_button/tab_off.pcx";
  531.               
  532.             },
  533.             GuiButton("city_tab_on") {
  534.               Width = 70;
  535.                 FontID = "font/verdana_9.tf";
  536.                 TextID = Mangle(350/*"City"*/);    
  537.               UpID = "gui/laptop/map_button/tab_on.pcx";
  538.             }
  539.           };
  540.         },
  541.         GuiButtonGroup("postcard_tab") {        
  542.           X = 68;
  543.           Y = 0;
  544.           Width=100;
  545.           RadioGroupID = 1;
  546.           ScriptID = Script {
  547.             @activate {
  548.               resid Player;
  549.               resid player_photo;
  550.               resid Game;
  551.               resid front_picture_id;
  552.               resid list_picture_id;
  553.               resid photo_postcard_list_id;
  554.               
  555.               Game = ResByName("Game");
  556.               Player = ResPropGetResID(Game,"game_cur_player");  
  557.                             
  558.               front_picture_id = ResByName("photo_album.gl/picture/list_picture/photo_picture/front_picture");
  559.               photo_postcard_list_id = ResPropGetResID(Player, "photo_postcard");
  560.               ResPropSetStr(Player, "photo_current", ResPropGetStr(Player, "photo_last_postcard"));
  561.               ResPropSetResID(Player, "photo_current_type", photo_postcard_list_id);
  562.               
  563.               list_picture_id = ResByName("photo_album.gl/picture/list_picture");
  564.               ResPropSetInt(list_picture_id,"Hidden",TRUE);
  565.               ResPropSetInt(list_picture_id,"Hidden",FALSE);
  566.             }
  567.           };      
  568.           ChildID = {
  569.             GuiButton("postcard_tab_off") {
  570.               Width = 70;
  571.                 FontID = "font/verdana_9.tf";
  572.                 TextID = Mangle(351/*"Postcard"*/);   
  573.               UpID = "gui/laptop/map_button/tab_off.pcx";
  574.               
  575.             },
  576.             GuiButton("postcard_tab_on") {
  577.               Width = 70;
  578.                 FontID = "font/verdana_9.tf";
  579.                 TextID = Mangle(352/*"Postcard"*/);    
  580.               UpID = "gui/laptop/map_button/tab_on.pcx";
  581.             }
  582.           };
  583.         },
  584.         GuiButtonGroup("commodity_tab") {
  585.           X = 136;
  586.           Y = 0;
  587.           Width=100;
  588.           RadioGroupID = 1;
  589.           ScriptID = Script {
  590.             @activate {
  591.               resid Player;
  592.               resid player_photo;
  593.               resid Game;
  594.               resid front_picture_id;
  595.               resid list_picture_id;
  596.               resid photo_commodity_list_id;
  597.               
  598.               Game = ResByName("Game");
  599.               Player = ResPropGetResID(Game,"game_cur_player");  
  600.                             
  601.               front_picture_id = ResByName("photo_album.gl/picture/list_picture/photo_picture/front_picture");
  602.               photo_commodity_list_id = ResPropGetResID(Player, "photo_commodity");
  603.               ResPropSetStr(Player, "photo_current", ResPropGetStr(Player, "photo_last_commodity"));
  604.               ResPropSetResID(Player, "photo_current_type", photo_commodity_list_id);
  605.               
  606.               list_picture_id = ResByName("photo_album.gl/picture/list_picture");
  607.               ResPropSetInt(list_picture_id,"Hidden",TRUE);
  608.               ResPropSetInt(list_picture_id,"Hidden",FALSE);
  609.             }
  610.           };      
  611.           ChildID = {
  612.             GuiButton("commodity_tab_off") {
  613.               Width = 70;
  614.                 FontID = "font/verdana_9.tf";
  615.                 TextID = Mangle(353/*"Commodity"*/);   
  616.               UpID = "gui/laptop/map_button/tab_off.pcx";
  617.               
  618.             },
  619.             GuiButton("commodity_tab_on") {
  620.               Width = 70;
  621.                 FontID = "font/verdana_9.tf";
  622.                 TextID = Mangle(354/*"Commodity"*/);    
  623.               UpID = "gui/laptop/map_button/tab_on.pcx";
  624.             }
  625.           };
  626.         }   /* END OF commodity_tab */
  627.       };    /* END OF PICTURE ChildID */
  628.     }
  629.   };    /* END OF MAIN ChildID */
  630. }
  631.